package com.mzw.huaxiarealestatebackend.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mzw.huaxiarealestatebackend.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;

/**
 * (User)表数据库访问层
 *
 * @author makejava
 * @since 2023-12-22 17:34:43
 */
@Mapper
public interface UserDao extends BaseMapper<User> {

    /**
     * 修改数据
     *
     * @param user 实例对象
     * @return 影响行数
     */
    int update(User user);

     // 输入
    User selectEmailAndPassword(String email, String password);
    User selectNameAndPassword( String username, String password);
    User selectUserInfoById(String uid);

    User getUserById(Integer uid);

    // 更新登录时间
    void updateLoginTime(String uid, String nowDateFormat);

    int insertUserInfo(User user);

    User selectUserInfoOne(String email);
}

